import './prototype'
import Ayaka from './ayaka'
import runner from './runner'
import { generatePixel } from './modules/pixel/generatePixel'
import { creepSay } from './modules/genshin/creepSay'
import { mountStructure } from './modules/structures'
import { updateStructureSite } from './modules/structureSite/controller'
import { clearRoomMap } from './modules/roomMap'
import { globalStart } from './modules/global'
import { updateMarket } from './modules/market'
import { crossShard } from './modules/shard'
import { updateFlag } from './modules/flag'
// import profile from './modules/profile'

const app = new Ayaka({
    botName: 'ayaka-bot',
    minCpu: 50,
    ...runner,
})

// 挂载建筑
app.on(mountStructure)
// 建筑工地更新
app.on(updateStructureSite)
// 市场更新
app.on(updateMarket)
// 搓 pixel
app.on(generatePixel)
// 爬爬说话
app.on(creepSay)
// 清理房间地图数据
app.on(clearRoomMap)
// 全局开始
app.on(globalStart)
// 跨 shard
app.on(crossShard)
// 更新旗帜
app.on(updateFlag)

// export const loop = profile.warpLoop(app.run.bind(app))
export const loop = app.run

// @ts-ignore
// global.profile = profile
